//
//  ChatHeader.h
//  CocoaAsyncSocketClient
//
//  Created by lixiaoyi on 2018/7/10.
//  Copyright © 2018年 lixiaoyi. All rights reserved.
//

#ifndef ChatHeader_h
#define ChatHeader_h

#import "YZChatServerDefs.h"


#define kWidth      [UIScreen mainScreen].bounds.size.width
#define kHeight     [UIScreen mainScreen].bounds.size.height


#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"\n[File:%s] " "[Function:%s] " "[Line:%d] " fmt), __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...);
#endif

#define MessageFont [UIFont systemFontOfSize:16.0]
#define ICRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 blue:((float)(rgbValue & 0xFF)) / 255.0 alpha:1.0]
#define IColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define XZRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 blue:((float)(rgbValue & 0xFF)) / 255.0 alpha:1.0]

#define kChatVideoPath @"Chat/Video"  // video子路径
#define kVideoType @".mp4"

#define videwViewH kWidth * 1.0 // 录制视频视图高度
#define videwViewX kHeight * 0.36 // 录制视频视图X

typedef enum : NSUInteger {
    PullDirectionDown,
    PullDirectionUp,
} PullDirection;

#define kObjectIsEmpty(_object) (_object == nil \
|| [_object isKindOfClass:[NSNull class]] \
|| ([_object respondsToSelector:@selector(length)] && [(NSData *)_object length] == 0) \
|| ([_object respondsToSelector:@selector(count)] && [(NSArray *)_object count] == 0))


#endif /* ChatHeader_h */
